home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Screenblankers / GBlanker 020 / Install < prev    next >
Text File  |  1996-09-26  |  11KB  |  319 lines

  1. ;; -*- lisp -*-
  2. ;; Garshneblanker Installation Script $VER:Garshneblanker 38.4 (18.10.94)
  3. ;;
  4.  
  5. (set newBlankerVersion (getversion "BGUI/Garshneblanker"))
  6. (set newVer (/ newBlankerVersion 65536))
  7. (set newRev (- newBlankerVersion (* newVer 65536)))
  8.  
  9. (set oldUserLevel (user 3))
  10. (message
  11.  "\nWelcome to the Garshneblanker " ("%ld.%ld" newVer newRev) " installer "
  12.  "script.\n\nFollow the installer script's instructions to install "
  13.  "Garshneblanker on your system. Once Garshneblanker is running, you can "
  14.  "simply press the popup hotkey (which you'll specify later) to bring up its "
  15.  "user interface."
  16.  )
  17.  
  18. (set @last-compat-rev 7)
  19. (set @default-dest "SYS:WBStartup")
  20. (set @default-popkey "F9")
  21. (set @default-blankkey "F10")
  22. (set @default-timeout 180)
  23. (set @interface-choice "BGUI")
  24.  
  25. (select
  26.  (askchoice
  27.   (prompt "One of the new features of Garshneblanker is your choice of "
  28.           "user interface libraries. (Note: necessary libraries have not been "
  29.           "included because of file size and/or distribution constraints.)")
  30.   (choices "BGUI" "MUI")
  31.   (help "The BGUI version requires bgui.library by Jan van den Baard. The MUI "
  32.         "version requires muimaster.library by Stefan Stuntz.")
  33.  
  34.   )
  35.  (set @interface-choice "BGUI")
  36.  (set @interface-choice "MUI")
  37.  )
  38. (user oldUserLevel)
  39.   
  40. (set @default-dest
  41.      (askdir
  42.       (prompt "Where would you like Garshneblanker installed?")
  43.       (help "The WBStartup directory on your boot disk is likely the best "
  44.             "place to put blanker. This will insure that Garshneblanker is "
  45.             "run automatically when you boot your computer.")
  46.       (default @default-dest)
  47.       )
  48.      )
  49.  
  50. (working "Checking for previously installed version of Garshneblanker.")
  51.  
  52. (set newBlanker (tackon @interface-choice "Garshneblanker"))
  53. (if (exists (tackon @default-dest "Blanker"))
  54.     (set oldBlanker (tackon @default-dest "Blanker"))
  55.     (set oldBlanker (tackon @default-dest "Garshneblanker")))
  56.  
  57. (set newBlankerVersion (getversion newBlanker))
  58. (set newVer (/ newBlankerVersion 65536))
  59. (set newRev (- newBlankerVersion (* newVer 65536)))
  60.  
  61. (if (exists oldBlanker)
  62.     (set oldBlankerVersion (getversion oldBlanker))
  63.     (set oldBlankerVersion (+ (* 65536 37) 0)))
  64.  
  65. (set oldVer (/ oldBlankerVersion 65536))
  66. (set oldRev (- oldBlankerVersion (* oldVer 65536)))
  67.  
  68. (if (<= newBlankerVersion oldBlankerVersion)
  69.     (if (NOT
  70.          (askbool
  71.           (prompt ("Version %ld.%ld of Garshneblanker already installed. Install version %ld.%ld?" oldVer oldRev newVer newRev))
  72.           (default 0)
  73.           (help "An equal or newer version of Garshneblanker is already "
  74.                 "installed. If you would like to install Garshneblanker "
  75.                 "anyhow, click 'Yes'. If you don't want to install "
  76.                 "Garshneblanker, click 'No'.")
  77.           )
  78.          )
  79.         (abort "Equal or newer version of Garshneblanker already installed. "
  80.                "Aborting.")
  81.         )
  82.     )
  83.  
  84. (delete oldBlanker)
  85. (delete (tackon oldBlanker ".info"))
  86.  
  87. (if (< (/ (getversion) 65536) 39)
  88.     (set @library-default "Libs/V37/Garshnelib.library")
  89.     (set @library-default "Libs/V39/Garshnelib.library")
  90.     )
  91.  
  92. (copylib
  93.  (prompt "Copying Garshnelib.library to LIBS:")
  94.  (help @copylib-help)
  95.  (source @library-default)
  96.  (dest "LIBS:")
  97.  (confirm)
  98.  )
  99.  
  100. (copyfiles
  101.  (prompt ("Copying Garshneblanker to %s" @default-dest))
  102.  (help @copyfiles-help)
  103.  (source newBlanker)
  104.  (dest @default-dest)
  105.  )
  106.  
  107. (set oldUserLevel (user 3))
  108. (select
  109.  (askchoice
  110.   (prompt "Which icon would you like to have installed for Garshneblanker?")
  111.   (choices "Standard Workbench Icon" "Magic Workbench Icon" "NewIcons Icon")
  112.   (help "The magic workbench icon is simply a larger, 8 color icon. The "
  113.         "standard icon follows Commodore's 4 color and size standard. The "
  114.         "NewIcons icon is from the NewIcons package and will adapt to your "
  115.         "Workbench's color scheme (provided you are running the NewIcons "
  116.         "program).")
  117.   )
  118.  (set @icon-choice "GadTools/Garshneblanker.info")
  119.  (set @icon-choice "MUI/Garshneblanker.info")
  120.  (set @icon-choice "BGUI/Garshneblanker.info")
  121.  )
  122. (user oldUserLevel)
  123.  
  124. (copyfiles
  125.  (prompt ("Copying icon for %s" @default-dest))
  126.  (help @copyfiles-help)
  127.  (source @icon-choice)
  128.  (dest @default-dest)
  129.  )
  130.  
  131. (set @module-dest @default-dest)
  132.  
  133. (set @module-dest
  134.      (askdir
  135.       (prompt "Where would you like the Garshneblanker modules installed? (A "
  136.               "directory named Blankers will be created in the directory you "
  137.               "specify and the modules will be put there.)")
  138.       (help "You can put the blankers anywhere and Garshneblanker will look "
  139.             "for them there.")
  140.       (default @module-dest)
  141.       )
  142.      )
  143.  
  144. (set blankersDir (tackon @module-dest "Blankers"))
  145. (if (< oldRev @last-compat-rev) (run ("Delete %s" (tackon blankersDir "#?"))))
  146.  
  147. (copyfiles
  148.  (prompt ("Copying Garshneblanker modules to %s" @module-dest))
  149.  (help @copyfiles-help)
  150.  (source "")
  151.  (choices "Blankers")
  152.  (dest @module-dest)
  153.  )
  154.  
  155. (copyfiles
  156.  (prompt ("Copying Preferences Interpreter to %s" @module-dest))
  157.  (help @copyfiles-help)
  158.  (source @interface-choice)
  159.  (choices "PrefInterp")
  160.  (dest blankersDir)
  161.  )
  162.  
  163. (copyfiles
  164.  (prompt ("Copying Info Display program to %s" @module-dest))
  165.  (help @copyfiles-help)
  166.  (source "GadTools")
  167.  (choices "ShowInfo")
  168.  (dest blankersDir)
  169.  )
  170.  
  171. (set gblanker-path (tackon @default-dest "Garshneblanker"))
  172.  
  173. (tooltype
  174.  (dest gblanker-path)
  175.  (settooltype "BLANKERDIR" (tackon @module-dest "Blankers"))
  176.  (noposition)
  177.  )
  178.  
  179. (set @default-blankkey
  180.      (askstring
  181.       (prompt "What key-combination would you like to use to tell "
  182.               "Garshneblanker to immediately blank the screen? (This key "
  183.               "combination can be used after Garshneblanker is running to "
  184.               "blank the screen.)")
  185.       (help "When you press this combination of keys, Garshneblanker will "
  186.             "tell the current module to blank the screen. This is a standard "
  187.             "Commodities key-combination. This key-combination should be a "
  188.             "text string.\n\nExamples:\nAlt Help, Shift F1, Ctrl a")
  189.       (default @default-blankkey)
  190.       )
  191.      )
  192.  
  193. (tooltype (dest gblanker-path) (settooltype "BLANKKEY" @default-blankkey))
  194.  
  195. (select
  196.  (askchoice
  197.   (prompt "Garshneblanker will automatically blank the screen when you move "
  198.           "the mouse pointer into a particular corner of the screen. Which "
  199.           "corner would you like that to be?")
  200.   (choices "None" "Upper Left" "Upper Right" "Lower Right" "Lower Left")
  201.   (help "When the mouse pointer is moved into this corner of the screen, "
  202.         "Garshneblanker will immediately blank the screen, as if you had "
  203.         "pressed the blank key. This is similar to the AfterDark feature.")
  204.   )
  205.  (tooltype (dest gblanker-path) (settooltype "BLANKCORNER" "NONE"))
  206.  (tooltype (dest gblanker-path) (settooltype "BLANKCORNER" "UPPERLEFT"))
  207.  (tooltype (dest gblanker-path) (settooltype "BLANKCORNER" "UPPERRIGHT"))
  208.  (tooltype (dest gblanker-path) (settooltype "BLANKCORNER" "LOWERRIGHT"))
  209.  (tooltype (dest gblanker-path) (settooltype "BLANKCORNER" "LOWERLEFT"))
  210.  )
  211.  
  212. (select
  213.  (askchoice
  214.   (prompt "Garshneblanker will disable the inactivity timeout when you move "
  215.           "the mouse pointer into a particular corner of the screen. Which "
  216.           "corner would you like that to be?")
  217.   (choices "None" "Upper Left" "Upper Right" "Lower Right" "Lower Left")
  218.   (help "This means that while the mouse pointer is in this corner of the "
  219.         "screen, GBlanker won't blank the screen.")
  220.   )
  221.  (tooltype (dest gblanker-path) (settooltype "DONTCORNER" "NONE"))
  222.  (tooltype (dest gblanker-path) (settooltype "DONTCORNER" "UPPERLEFT"))
  223.  (tooltype (dest gblanker-path) (settooltype "DONTCORNER" "UPPERRIGHT"))
  224.  (tooltype (dest gblanker-path) (settooltype "DONTCORNER" "LOWERRIGHT"))
  225.  (tooltype (dest gblanker-path) (settooltype "DONTCORNER" "LOWERLEFT"))
  226.  )
  227.  
  228. (set TimeOut
  229.      (asknumber
  230.       (prompt "How long should Garshneblanker wait before automatically "
  231.               "blanking the screen. (This value is in seconds.)")
  232.       (help "Garshneblanker will blank the screen if the number of seconds "
  233.             "you specify pass without any user input occurring on your "
  234.             "computer.")
  235.       (default 180)
  236.       )
  237.      )
  238.  
  239. (tooltype (dest gblanker-path) (settooltype "TIMEOUT" ("%ld" TimeOut)))
  240.  
  241. (if
  242.  (askbool
  243.   (prompt "When Garshneblanker is set to choose a random module upon blanking "
  244.           "would you like Garshneblanker to load and blank with a new module "
  245.           "every so often?")
  246.   (help "This will set the REPLACE tooltype to either YES or NO according to "
  247.         "your response. If you choose YES, when Garshneblanker is set to "
  248.         "choose a random module, it will load a new module after the interval "
  249.         "specified in the RANDTIMEOUT tooltype has elapsed and the screen is "
  250.         "still blanked.")
  251.   (default 1)
  252.   )
  253.  (
  254.   (tooltype (dest gblanker-path) (settooltype "REPLACE" "YES"))
  255.   (set RandTimeout
  256.        (asknumber
  257.         (prompt "What would you like the interval between random blanker "
  258.                 "changes to be? (This value is in seconds.)")
  259.         (help "While Garshneblanker is blanking the screen with a random "
  260.               "module, it will load a new random module every time this "
  261.               "time period elapses. This is set in the RANDTIMEOUT tooltype.")
  262.         (default 30)
  263.         )
  264.        )
  265.   (tooltype
  266.    (dest gblanker-path)
  267.    (settooltype "RANDTIMEOUT" ("%ld" RandTimeout))
  268.    )
  269.   )
  270.  (tooltype (dest gblanker-path) (settooltype "REPLACE" "NO"))
  271.  )
  272.  
  273. (set @default-popkey
  274.      (askstring
  275.       (prompt "What key-combination shall Garshneblanker use to pop up it's "
  276.               "interface? (This key combination can be used after "
  277.               "Garshneblanker is running to bring it's window to front.)")
  278.       (help "This is a standard Commodities key-combination. When you press "
  279.             "this combination of keys, Garshneblanker will open up its "
  280.             "preferences window so that you can modify its settings. This "
  281.             "key-combination should be a text string.\n\nExamples:\nAlt Help, "
  282.             "Shift F1, Ctrl a")
  283.       (default @default-popkey)
  284.       )
  285.      )
  286.  
  287. (tooltype (dest gblanker-path) (settooltype "CX_POPKEY" @default-popkey))
  288.  
  289. (if
  290.  (askbool
  291.   (prompt "Would you like Garshneblanker to open its window on startup?")
  292.   (help "This will set the CX_POPUP tooltype to YES or NO depending on your "
  293.         "response. This tooltype dictates whether or not Garshneblanker opens "
  294.         "it's window when it first runs.")
  295.   (default 1)
  296.   )
  297.  (
  298.   (set cxPopUp "YES")
  299.   (set popUpMsg "Garshneblanker will automatically bring up its interface after you have run it.")
  300.   )
  301.  (
  302.   (set cxPopUp "NO")
  303.   (set popUpMsg ("Garshneblanker will not automatically bring up its interface after you have run it. You will have to press the %s key-combination to make the interface come up." @default-popkey))
  304.   )
  305.  )
  306.  
  307. (tooltype (dest gblanker-path) (settooltype "CX_POPUP" cxPopUp))
  308.  
  309. (run "MakeDir ENV:PrefInterp")
  310. (run "MakeDir ENVARC:PrefInterp")
  311.  
  312. (set oldUserLevel (user 3))
  313. (message
  314.  ("\nGarshneblanker is now installed in your %s directory. You can run it by double clicking on its icon. %s\n\nIf you have any questions at all, feel free to contact me via e-mail at:\n\nmbayne@qualcomm.com" @default-dest popUpMsg)
  315.  )
  316. (user oldUserLevel)
  317.  
  318. (exit (quiet))
  319.